//
//  SCSegmentView.h
//  BaseSwift
//
//  Created by ghwang on 2019/7/23.
//  Copyright © 2019 ghwang. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@protocol SCViewProtocol <NSObject>
@optional;
//设置数据源
- (void)setViewWithModel:(id)obj;
//添加子视图
- (void)addSubViews;
//设置约束
- (void)setConstraints;

//初始化ui默认
- (void)configUIDefault;

- (void)reloadUI;

@end


@interface SCSegmentView : UIView<SCViewProtocol>
@property (nonatomic,copy) void  (^segmentSwitchBlock) (long selectedSegmentIndex);

@property (nonatomic,assign) long selectedSegmentIndex;

- (instancetype)initWithItemList:(NSArray *)itemList;
@end

NS_ASSUME_NONNULL_END
